//
//  SearchPhoneCell.m
//  Guazi
//
//  Created by koolearn on 11-7-21.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "SearchPhoneCell.h"


@implementation SearchPhoneCell

@synthesize phoneLabel;


- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.phoneLabel = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease];
        [self.contentView addSubview:phoneLabel];
        
        UIImage* image = [UIImage imageNamed:@"button_c_phone.png"];
        self.accessoryView = [[[UIImageView alloc] initWithImage:image] autorelease];
    }
    return self;
}


- (void) layoutSubviews
{
    phoneLabel.frame = CGRectMake(10, 5, 200, 20);
    [super layoutSubviews];
}


- (void) setPhone:(NSString*)phone
{
    self.phoneLabel.text = phone;
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)dealloc
{
    [phoneLabel release];
    [super dealloc];
}

@end
